package com.hw.springquartz;

import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.impl.StdSchedulerFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class SpringQuartzApplication {

	public static void main(String[] args) {
		Logger log=LoggerFactory.getLogger(SpringQuartzApplication.class);
		log.info("quartz simple demo is start");
		try {
			Scheduler scheduler=StdSchedulerFactory.getDefaultScheduler();
			
			
			scheduler.start();
			
			scheduler.shutdown();
		} catch (SchedulerException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		SpringApplication.run(SpringQuartzApplication.class, args);
	}
}
